<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var num = prompt('请输入一个整数') - 0
        if (num % 1 === 0) {
            if (num > 0) {
                alert('这个整数大于零')
            } else if (num === 0) {
                alert('这个整数是零')
            } else {
                alert('这个整数小于零')
            }
        } else {
            alert('请输入个整数')
        }
    </script>
</body>

</html>